package link.chengguo.orangemall.service.cms.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import link.chengguo.orangemall.cms.entity.CmsSubjectCategory;
import link.chengguo.orangemall.cms.mapper.CmsSubjectCategoryMapper;
import link.chengguo.orangemall.cms.service.ICmsSubjectCategoryService;
import link.chengguo.orangemall.utils.CommonResult;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 专题分类表 服务实现类
 * </p>
 *
 * @author chengguo
 * @since 2019-04-17
 */
@Service
public class CmsSubjectCategoryServiceImpl extends ServiceImpl<CmsSubjectCategoryMapper, CmsSubjectCategory> implements ICmsSubjectCategoryService {

    /**
     *
     * @param ids
     * @return
     */
    @Override
    public Object removeBatchByIds(List<Long> ids) {
        boolean count = removeByIds(ids);
        if (count) {
            return new CommonResult().success(count);
        } else {
            return new CommonResult().failed();
        }

    }
}
